package String;

public class StringDemo {
    public static void main(String[] args) {
        String s1="123abc";
        String s2="123abc";
        String s3="123abc";
        System.out.println(s1==s2);
        System.out.println(s1==s3);
        s3=s3+"!";
        System.out.println(s1==s3);
        String s4="123"+"abc";
        System.out.println(s1==s4);
        String s5="123";
        String s6=s5+"abc";
        System.out.println(s6==s1);

        String s=new String("hello");
        String s8="hello";
        System.out.println(s==s8);
        System.out.println(s.equals(s8));
    }
}
